<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('勘察成果审查')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:src="@{/js/plugins/datetime/moment.js}"></script>
    <script th:inline="javascript">
    var prefix = ctx + "surResult/surResult";
    
    $(function() {
    	var guid = [[${guid}]]
    	 var options = {
      			showSearch:false,
               	showRefresh:false,
               	showToggle:false,
               	showColumns:false,
    			url: prefix + "/certificateTableInfo/"+guid,
                updateUrl: prefix + "/edit/{id}",
                exportUrl: prefix + "/export",
                detailUrl: prefix + "/detailCertificate/{id}",
                modalName: "审查合格书",
                columns: [{
                        field: 'id',
                        title: '序号',
						formatter: function (value, row, index) {
						
						    return index + 1;
						}
                    },
					{
                        field: 'cmlGuid',
                        title: '合格证编辑日志表标识符',
						visible: false
                    },
					{
                        field: 'modifyName',
                        title: '编辑人'
                    },
                    {
                        field: 'certificateNumber',
                        title: '合格证编号'
                    },
                    {
                        field: 'modifyTime',
                        title: '编辑时间',
						formatter: function (value, row, index) {
							if(value == '' || value == null){
								return value;
							}else{
								return moment(value).format('YYYY-MM-DD');	
							}
						}
                    },
                    {
	                    field: 'opera',
	                    title: '操作',
                        formatter: function (value, row, index) {
                            var actions = [];
							actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.cmlGuid + '\')"><i class="fa fa-edit"></i>合格书</a> ');
                            return actions.join('');
	                       }
	                }]
        };
    	$.table.init(options);
    });
    </script>
</body>
</html>